home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 October / PCWorld_1999-10_cd1.bin / Software / TemaCD / RCEdit / RCEdit.CAB / Scrolling Text - Status Line.js < prev    next >
Text File  |  1996-09-30  |  867b  |  38 lines

  1. // Stat bar scrolling message
  2.  
  3.     function scroll_status (seed) {
  4.         var msg = "Put your text here!!";
  5.         var out = " ";
  6.         var c = 1;
  7.             if (150 < seed) {
  8.                 seed--;
  9.             var cmd="scroll_status(" + seed + ")";
  10.         timerTwo = window.setTimeout(cmd, 25);
  11.     }
  12.  
  13.     else if (seed <= 150 && 0 < seed) {
  14.         for (c=0 ; c < seed ; c++) {
  15.             out+=" ";
  16.         }
  17.         out+=msg;
  18.         seed--;
  19.         var cmd="scroll_status(" + seed + ")";
  20.         window.status=out;
  21.         timerTwo=window.setTimeout(cmd,25);
  22.     }
  23.  
  24.     else if (seed <= 0) {
  25.             if (-seed < msg.length) {
  26.             out+=msg.substring(-seed,msg.length);
  27.             seed--;
  28.         var cmd="scroll_status(" + seed + ")";
  29.             window.status=out;
  30.             timerTwo=window.setTimeout(cmd,25);
  31.         }
  32.  
  33.         else {
  34.             window.status=" ";
  35.             timerTwo=window.setTimeout("scroll_status(150)",25);
  36.             }
  37.         }
  38.     }